In the previous video, you understood Error Handling
Approaches and Activities. In this video you
will understand that Try Catch Activity,
so let's get started. The Try Catch Activity is one of the most important activities used for exception
handling purposes. It is generally used when specific parts of the
project may trigger errors. The activity catches a
specified exception type in a sequence in either displays an error
notification or dismisses it and
continues the execution. The activity has
three main sections. The first is Try, this holds the activity that
could throw an exception. The second is Catches, it specifies an
activity or a set of activities to be performed
when an error occurs. It has an exception section where the exception
types are defined, here multiple exceptions
can be added. The third is Finally, it holds an activity that
will be executed only if no error occurs or if the
error is already caught. As a mechanism, Try Catch runs the activities
in the try block, executes the activities in the catch block if
an error occurs. The Finally block is executed only when no exceptions
are thrown or when an exception is
caught and handled in the catch block without
being re-throw. In the next video, you will see a demonstration
on how to catch an error or exception and continue running a code using a Try
Catch Activity. I would encourage
you to go through the demonstration and attempt
to repeat it on your own. That's it for this video.
Thanks for watching.